package com.itkm.repository;

import com.itkm.entity.AuthorityEnum;
import com.itkm.entity.CustomerAuthority;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.Optional;

public interface CustomerAuthorityRepository extends JpaRepository<CustomerAuthority, Integer> {
    @Query("select authorityEnum from t_customer_authority where customer.username = ?1")
   AuthorityEnum findAuthByUsername(String username);
}
